<template>
  <div class="components-container">
    <div class="editor-container">
      <el-tag class="tag-title">
        规则
      </el-tag>
      <!-- <el-alert
        :closable="false"
        title="You can change the language of the admin system to see the effect"
        type="success"
      /> -->
      <markdown-editor ref="markdownEditor"  @changeMsg="getHtml" />
    </div>

    <el-button style="margin-top:80px;" type="primary" icon="el-icon-document" @click="getHtml">
      Get HTML
    </el-button>
    <div v-html="html" />
  </div>
</template>

<script>
import MarkdownEditor from '@/components/MarkdownEditor'

const content = `
## This is test
`
export default {
  name: 'MarkdownDemo',
  components: { MarkdownEditor },
  data() {
    return {
      languageTypeList: {
        'en': 'en_US',
        'zh': 'zh_CN',
        'es': 'es_ES'
      }
    }
  },
  computed: {
    language() {
      return this.languageTypeList['en']
    }
  },
  methods: {
    getHtml(e) {
      console.log(e)
    }
  }
}
</script>

<style scoped>
.editor-container{
  margin-bottom: 30px;
}
.tag-title{
  margin-bottom: 5px;
}
</style>
